package com.lxy.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName(value = "buy_orders")
public class BuyOrder implements Serializable {
    private static final long serialVersionUID = 1L;
    private Long id;
    //下单用户的id
    private Long userId;
    //收货人的姓名
    private String consigneeName;
    //收货人的手机号
    private String consigneePhone;
    //骑手的id
    private Long riderId;
    //要购买的货物
    private String goods;
    //货物图
    private String goodsImg;
    //购买的货物类型
    private String type;
    //城市
    private String city;
    //购买地址经度
    private Double purchaseLongitude;
    //购买地址纬度
    private Double purchaseLatitude;
    //购买地址，能够指定，也能让骑手在附近购买
    private String purchaseAddress;
    //收货地址经度
    private Double deliveryLongitude;
    //收货地址纬度
    private Double deliveryLatitude;
    //收货地址经
    private String deliveryAddress;
    //配送费
    private BigDecimal deliveryAmount;
    //配送状态：1正在配送中，0等待接单
    private Integer status;
    //订单创建时间
    private LocalDateTime createTime;
    //乐观锁版本号
    @Version
    private Integer version;
}
